package com.link.base.base.address.dao.mybatis.mapper;

import com.link.base.base.address.model.AddrTree;
import com.link.base.base.address.model.AllAddress;
import com.link.core.basic.dao.mapper.BasicMapper;

import java.util.List;
/**
 * Copyright  hande Company. All Rights Reserved.
 *
 * @author  unknwon
 * @date:   2018/11/8 10:30
 * @version 1.0
 */

public interface AllAddressMapper extends BasicMapper<AllAddress> {
    /**
     * 根据变量类型得到所有的地址信息
     *
     * @param record
     * @return
     * @throws Exception
     */
    public List<AllAddress> queryByTypeAddressListPage(AllAddress record) throws Exception;

    /**
     * 当更改了类型为国家时，这时需要将此条信息的父id清空
     *
     * @param record
     * @throws Exception
     */
    public void allByCountryUpdate(AllAddress record) throws Exception;

    /**
     * 修改父地址信息
     *
     * @param record
     * @throws Exception
     */
    public void parentIdUpdate(AllAddress record) throws Exception;

    /**
     * 查询树形结构省市县
     *
     * @param record
     * @throws Exception
     */
    public List<AddrTree> queryAllAddress(AddrTree record) throws Exception;
}
